set.seed(100)
p = c(0.046,0.048,0.052,0.054,0.018,0.020,0.022,0.060,0.070,0.080)
for(px in p){
  data = sample(c(1,0),size = 3000*19,prob = c(px,1-px),replace = T)
  dim(data) = c(3000,19)
  py = as.integer(px*1000)
  file_name = stringr::str_c("genemat_",py,".txt")
  data = as.data.frame(data)
  colnames(data) = NULL
  write.table(data,file = file_name,row.names = F)
}

data = read.table("genemat_18.txt",header = F)
which.max(rowSums(data))
